        <?php $i = 1; $j = 1; ?>
        <?php foreach($articles as $article): ?>
        <?php $pre = false; ?>
        <article>
        	<?php $lbs = stripos($article['Article']['contents'], 'class="brush:'); ?>
			<?php if($lbs && ($j < 2)) : ?>
            <link href="/tools/syntaxhighlighter/styles/shCore.css" rel="stylesheet" type="text/css" />
            <link href="/tools/syntaxhighlighter/styles/shThemeDefault.css" rel="stylesheet" type="text/css" />
            <script src="/tools/syntaxhighlighter/scripts/shCore.js" type="text/javascript"></script>
            <script src="/tools/syntaxhighlighter/scripts/shAutoloader.js" type="text/javascript"></script>
            <?php $j++; $ssh = true; endif; ?>
            <?php $pre = $lbs ? true : $pre; ?>
        	<?php $date = date_create($article['Article']['created']); ?>
            <?php $link = empty($article['Article']['html']) ? '/articles/view/'.$article['Article']['id'] : '/'.$article['Article']['html']; ?>
            <h2 <?php echo ($i <= 1) ? 'class="top_title"' : 'class="sub_titile"'; ?>><a href="<?php echo $link; ?>"><?php echo $article['Article']['title']; ?> <span><?php echo date_format($date, 'Y/m/d'); ?></span></a></h2>
            <div class="sub_div">
            <?php if($i > 1 && !$pre):?>
            <?php echo $text->truncate($article['Article']['contents'], 288, array('ending' => '...  <a href="'.$link.'" target="_blank">打开全文 ››››</a>', 'exact' => true, 'html' => true)); ?>
            <?php else :?>
            <?php echo $article['Article']['contents']; ?>
            <?php endif;?>
            </div>
        </article>
        <?php $i++; ?>
        <?php endforeach; ?>
		<?php if(isset($ssh) && $ssh) : ?>
            <script type="text/javascript">
				function path(){
					var args = arguments,	result = [];
					for(var i = 0; i < args.length; i++)
						result.push(args[i].replace('@', '/tools/syntaxhighlighter/scripts/'));
						return result;
				};
				SyntaxHighlighter.autoloader.apply(null, path(
				'applescript            @shBrushAppleScript.js', 
				'actionscript3 as3      @shBrushAS3.js',  
				'bash shell             @shBrushBash.js',  
				'coldfusion cf          @shBrushColdFusion.js',  
				'cpp c                  @shBrushCpp.js',  
				'c# c-sharp csharp      @shBrushCSharp.js',  
				'css                    @shBrushCss.js',  
				'delphi pascal          @shBrushDelphi.js',  
				'diff patch pas         @shBrushDiff.js',  
				'erl erlang             @shBrushErlang.js',  
				'groovy                 @shBrushGroovy.js',  
				'java                   @shBrushJava.js',  
				'jfx javafx             @shBrushJavaFX.js',  
				'js jscript javascript  @shBrushJScript.js',  
				'perl pl                @shBrushPerl.js',  
				'php                    @shBrushPhp.js',  
				'text plain             @shBrushPlain.js',  
				'py python              @shBrushPython.js',  
				'ruby rails ror rb      @shBrushRuby.js',  
				'sass scss              @shBrushSass.js',  
				'scala                  @shBrushScala.js',  
				'sql                    @shBrushSql.js',  
				'vb vbnet               @shBrushVb.js',  
				'xml xhtml xslt html    @shBrushXml.js'));
				SyntaxHighlighter.all();
            </script>
        <?php unset($ssh); endif; ?>
        <div class="clear"></div>
        <div id="pager">
			<?php echo $this->Paginator->prev('<< 上一页', array(), null, array('class'=>'pager_disable'));?> <?php echo $this->Paginator->numbers();?> <?php echo $this->Paginator->next('下一页 >>', array(), null, array('class' => 'pager_disable'));?> <?php echo $this->Paginator->counter(array('format' => '<span class="pages">第 %page% 页，共 %pages% 页</span>')); ?>
        </div>